//
//  UTString+Size.swift
//  iPhoneUTests
//
//  Created by Toj on 3/28/23.
//

import XCTest

class UTString_Size: XCTestCase {

    override func setUpWithError() throws {
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }

    override func tearDownWithError() throws {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
    }

    func testExample() throws {
        // This is an example of a functional test case.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
    }

    func testPerformanceExample() throws {
        // This is an example of a performance test case.
        self.measure {
            // Put the code you want to measure the time of here.
        }
    }
}

extension UTString_Size {
    
    func testStringSize() {
        let oneHeight = "234567".cm_stringOneLineHeight(font: 16.to_systemFont)
        let oneWidth  = "234567".cm_stringOneLineWidth(font: 16.to_systemFont)
        let oneWidth2 = "234567".cm_stringWidth(font:  16.to_systemFont, maxHeight: 10)
        let oneWidth3 = "234567".cm_stringOneLineWidth1(font: 16.to_systemFont)
        
        print("-->UTests: oneHeight: \(oneHeight)")
        print("-->UTests: oneWidth : \(oneWidth)")
        print("-->UTests: oneWidth2: \(oneWidth2)")
        print("-->UTests: oneWidth3: \(oneWidth3)")
    }
}
